import scrapy


class RequestParamsSpider(scrapy.Spider):
    name = "request_params"


    async def start(self):
        yield scrapy.Request(url=f"https://httpbin.org/get?id=101", cb_kwargs={"name": "qiku"}, meta={"age": 10})

    async def parse(self, response, name):
        print(name, "-----", response.meta["age"])
        response.meta.update({
            "addr": "东三街"
        })
        yield scrapy.FormRequest(url=f'https://httpbin.org/post', method="POST", callback=self.parse_leve2, cb_kwargs={"name": name}, meta=response.meta)

    async  def parse_leve2(self, response, name):
        print(name, "=====", response.meta)
        # print(response.json())
